/* AI助手页面样式 */

/* 聊天区域 */
.chat-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-header {
    padding: 20px;
    background-color: #5bc0eb;
    color: white;
    text-align: center;
}

.chat-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: white;
    padding: 5px;
}

.chat-title h2 {
    margin: 0;
    font-size: 22px;
}

.chat-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in-out;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    background-color: #f0f7fc;
    padding: 15px;
    border-radius: 12px;
    position: relative;
}

.ai-message .message-content {
    background-color: #f0f7fc;
    border-top-left-radius: 0;
}

.user-message .message-content {
    background-color: #5bc0eb;
    color: white;
    border-top-right-radius: 0;
}

.message-content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.suggestion-item {
    background-color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background-color: #5bc0eb;
    color: white;
    border-color: #5bc0eb;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: white;
}

.chat-input textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    resize: none;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input textarea:focus {
    border-color: #5bc0eb;
}

.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #5bc0eb;
    color: white;
    border: none;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-button:hover {
    background-color: #3a9fcb;
}

.send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.send-button i {
    font-size: 18px;
}

/* AI功能介绍 */
.ai-features {
    padding: 70px 0;
    background-color: white;
}

/* 用户反馈 */
.user-feedback {
    padding: 70px 0;
    background-color: #f8f9fa;
}

.feedback-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    margin: 0 -15px;
    padding: 0 15px 20px;
    scroll-behavior: smooth;
}

.feedback-slider::-webkit-scrollbar {
    height: 8px;
}

.feedback-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.feedback-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.feedback-slider::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.feedback-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    min-width: 300px;
    flex: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feedback-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feedback-content {
    margin-bottom: 20px;
}

.feedback-content p {
    font-style: italic;
    color: #555;
    line-height: 1.6;
    position: relative;
}

.feedback-content p::before,
.feedback-content p::after {
    font-size: 24px;
    color: #5bc0eb;
    position: absolute;
}

.feedback-content p::before {
    content: '\201C';
    left: -15px;
    top: -5px;
}

.feedback-content p::after {
    content: '\201D';
    right: -15px;
    bottom: -5px;
}

.feedback-author {
    display: flex;
    align-items: center;
}

.feedback-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.author-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chat-container {
        height: 500px;
        margin: 0 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .feedback-card {
        min-width: 260px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #5bc0eb;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}